package com.dl.mall.handler;

import lombok.extern.slf4j.Slf4j;


/**
 * 监听 productSpecs表 变化
 * @author DL
 * @create 2022-05-13 13:13
 */
/*@Component
@CanalTable(value = "product_specs")*/
    //implements  EntryHandler<ProductSpecs>
@Slf4j
public class CanalProductSpecsHandler {

/*    @Override
    public void insert(ProductSpecs productSpecs) {
        // CanalModel可以得到当前这次的库名和表名
        CanalModel canal = CanalContext.getModel();
        System.out.println("canal.getId() = " + canal.getId());
        log.info("productSpecs-insert:{}", productSpecs);
        //业务操作
        //新增缓存操作等
    }

    @Override
    public void update(ProductSpecs before, ProductSpecs after) {
        log.info("productSpecs- update-before:{}，update-after:{}", before, after);
        //业务操作
        //更新缓存操作等
    }

    @Override
    public void delete(ProductSpecs productSpecs) {
        log.info("productSpecs-delete:{}", productSpecs);

        //业务操作
        //删除缓存操作等
    }*/
}
